﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Modules.malls.MarketUI.view {
    import flash.display.*;
    import Mechanics.GameMechanicInterfaces.*;
    import flash.utils.*;
    import org.aswing.*;
    import Classes.util.*;
    import Display.aswingui.*;
    import Display.GridlistUI.view.*;

    public class MallCellView extends ItemCellView {

        protected var m_mechanicUser:IMechanicUser;
        protected var m_slotId:int;
        protected var m_arrowAlignPanel:JPanel;
        protected var m_arrowPanel:JPanel;
        protected var m_arrowPanelInsets:Insets;
        protected var m_showArrow:Boolean;
        protected var m_tabId:int;

        public function MallCellView(_arg1:IMechanicUser, _arg2:int, _arg3:int, _arg4:Boolean=true){
            this.m_mechanicUser = _arg1;
            this.m_slotId = _arg2;
            this.m_tabId = _arg3;
            this.m_showArrow = _arg4;
            if (this.m_showArrow){
                this.m_arrowAlignPanel = ASwingHelper.makeSoftBoxJPanelVertical(SoftBoxLayout.CENTER);
                this.m_arrowPanel = ASwingHelper.makeSoftBoxJPanel(SoftBoxLayout.CENTER);
                this.m_arrowPanelInsets = new Insets(0, 5, 20, 0);
            };
        }
        public function get generator():IMechanicUser{
            return (this.m_mechanicUser);
        }
        protected function get arrowAsset():DisplayObject{
            return (m_assetDict["sequence_arrow"]);
        }
        override public function makeAssets(_arg1:Dictionary):void{
            var _local2:DisplayObject = _arg1[DelayedAssetLoader.MALL_ASSETS];
            this.m_assetDict["sequence_arrow"] = (new (_local2["mall_arrow"])() as DisplayObject);
        }
        override public function updateView(_arg1):void{
            ASwingHelper.prepare(this);
        }
        public function get slotId():int{
            return (this.m_slotId);
        }
        public function get tabId():int{
            return (this.m_tabId);
        }
        override protected function initLayout():void{
            super.initLayout();
            if (this.m_arrowAlignPanel){
                if (this.m_arrowPanel){
                    this.updateArrowPanel();
                    this.m_arrowAlignPanel.append(this.m_arrowPanel);
                };
                this.append(this.m_arrowAlignPanel);
            };
            ASwingHelper.setEasyBorder(m_panel, 0, 13, 0);
        }
        protected function updateArrowPanel():void{
            if (this.arrowAsset){
                ASwingHelper.setSizedBackground(this.m_arrowPanel, this.arrowAsset, this.m_arrowPanelInsets);
                ASwingHelper.prepare(this.m_arrowAlignPanel);
            };
        }

    }
}//package Modules.malls.MarketUI.view 
